import json

from ronglian_sms_sdk import SmsSDK

accId = '2c94811c936de29c019370546bf30046'
accToken = 'ce36ab690c1b4acc92144403b281b645'
appId = '2c94811c936de29c019370613f5b009a'

def send_message(phone,code):
    sdk = SmsSDK(accId, accToken, appId)
    tid = '1'
    mobile = phone
    datas = (code,)
    resp = json.loads(sdk.sendMessage(tid, mobile, datas))
    if resp['statusCode'] == '000000':
        return True
    else:
        return False


